package io.github.echarts.model.coordinate.cartesian;

import io.github.echarts.model.coordinate.CoordinateSystem;
import io.github.echarts.model.coordinate.DataRange;
import io.github.echarts.model.coordinate.axis.AxisModel;

/**
 * Interface for Cartesian coordinate system
 */
public interface CartesianCoordinateSystem extends CoordinateSystem {
    /**
     * Get position on X axis based on category value
     * @param category Category value
     * @return X coordinate
     */
    double getCategoryPositionX(Object category);
    
    /**
     * Get position on X axis based on category index
     * @param index Category index
     * @return X coordinate
     */
    double getCategoryPositionXByIndex(int index);
    
    /**
     * Get the maximum available width for a category
     * @param category Category value
     * @return Maximum available width
     */
    double getCategoryWidth(Object category);
    
    /**
     * Get position on Y axis based on value
     * @param value Numeric value
     * @return Y coordinate
     */
    double getValuePositionY(Number value);
    
    /**
     * Get the data range of the coordinate system
     * @return Data range
     */
    DataRange getDataRange();
    
    /**
     * Get X axis model
     * @return X axis model
     */
    AxisModel getXAxisModel();
    
    /**
     * Get Y axis model
     * @return Y axis model
     */
    AxisModel getYAxisModel();
    
    /**
     * Get coordinate transformer
     * @return Coordinate transformer for this coordinate system
     */
    CartesianCoordinateTransformer getTransformer();
} 